(function(){
	@@include("./common/_menu.js")
	@@include("./common/_popWindow.js")
	if(!isMobile){
		var $quickList = $(".quick-list");
		var height = $quickList.offset().top;
		var $listContainer = $(".about-list");
		var $listDetail = $listContainer.find("li");
		var length = $listDetail.length;

		/*$(".quick-list li").on("click",function(){
			var index = $(this).index();
			var top  = $listDetail[index].offsetTop + 80;
			$("html,body").animate({scrollTop:top},500);
		})*/
		$listContainer.scrollspynav();
		$(window).on('scroll',function(){
			if($(window).scrollTop()>height - 80 && $(window).scrollTop()<$listContainer.offset().top + $listContainer.height() - $quickList.outerHeight()-80){
		    	if(!$quickList.hasClass("left-fixed")){
		       		$quickList.addClass("left-fixed").css({
		       			"right":'auto',
		       			"top":0
		       		});
		       	}	       	
		    } else {
		    	$quickList.removeClass("left-fixed").attr("style","");
		    	if($(window).scrollTop()>=$listContainer.offset().top + $listContainer.height() - $quickList.outerHeight()-80){
		    		$quickList.css({
		    			"top": $listContainer.height() - $quickList.outerHeight() - 30,
		    			"left": 0
		    		});
		    	}
		    }
		    
		    /*for(var i = length-1;i>=0;i--){
	       		if($(window).height()*2/3+$(window).scrollTop()>$listDetail.eq(i).offset().top && $(window).scrollTop()<$listDetail.eq(i).offset().top+$listDetail.eq(i).height()){
	       			$quickList.find("li").eq(i).addClass("current").siblings().removeClass("current");
	       			break;
	       		}
	       	}  */
		})
	}
})()
